enableremote: Disallow using type= to attempt to change the type of an existing remote
authorJoey Hess <joeyh@joeyh.name>
Mon, 22 Sep 2025 14:54:16 +0000 (10:54 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 22 Sep 2025 14:54:16 +0000 (10:54 -0400)
commitdfbf76e2ca50d31eca6dee253c5bf3c892301463
treef6ee4d5a0e178aff9b09aafc5ad3bcc9714920d7
parente1c6a48f9655e9c30151464d94f9a466aa66f08e
enableremote: Disallow using type= to attempt to change the type of an existing remote

Changing the type out from under an existing special remote exposes the
existing config to something that may interpret it wildly differently. As
seen in the bug report, this can even result in behavior that makes
git-annex say it's buggy. So prevent the user from doing this. --sameas is
the better way.

Sponsored-by: Kevin Mueller
CHANGELOG
Command/EnableRemote.hs
doc/bugs/enableremote_type__61__rclone_on_existing_remote_crash.mdwn